package www.wmx.com.xssc.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.Objects;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class WcryShortXM  extends CommonShortXM{

    @ApiModelProperty(value = "姓名")
    private String xm;

    @ApiModelProperty(value = "性别")
    private String xb;

    @ApiModelProperty(value = "单位编号")
    private String dwid;

    @ApiModelProperty(value = "职务")
    private String zw;

    @ApiModelProperty(value = "职称")
    private String zc;

    @ApiModelProperty(value = "参加项目时间起")
    private LocalDate cjsjq;

    @ApiModelProperty(value = "参加项目时间止")
    private LocalDate cjsjz;

    public CommonShortXM getCommonShortXM(){
        CommonShortXM commonShortXM = new CommonShortXM();
        commonShortXM.setNd(getNd());
        commonShortXM.setCgjlType(getCgjlType());
        commonShortXM.setJbxxID(getJbxxID());
        commonShortXM.setXmBeginTime(getXmBeginTime());
        commonShortXM.setXmEndTime(getXmEndTime());
        commonShortXM.setXmmc(getXmmc());
        return  commonShortXM;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        WcryShortXM that = (WcryShortXM) o;
        return Objects.equals(xm, that.xm) && Objects.equals(xb, that.xb) && Objects.equals(dwid, that.dwid) && Objects.equals(zw, that.zw) && Objects.equals(zc, that.zc);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), xm, xb, dwid, zw, zc);
    }
}
